package demo01;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;

public class zuoye05 {
	public static void main(String[] args) {
		int[] arr1 = {1,2,3};
		int[] arr2 = {3,4,5,2};
		HashMap<Integer,Integer> map = new HashMap<>();
		for (int num: arr1){
			map.put(num, map.getOrDefault(num, 0)+1);
		}
		for (int num: arr2){
			map.put(num, map.getOrDefault(num, 0)+1);
		}
		List<Integer> collect = map.keySet().stream().filter(t->map.get(t)==1).collect(Collectors.toList());
		System.out.println(collect);
	}
}
